<%--
  Created by IntelliJ IDEA.
  User: 邢式瑞
  Date: 2022/9/3
  Time: 10:14
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<h2>${username}</h2>

<table border="1">
    <tr>
        <th>编号</th>
        <th>姓名</th>
        <th>生日</th>
        <th>性别</th>
        <th>职业</th>
        <th>地址</th>
        <th>电话</th>
        <th>操作</th>
    </tr>
    <%



    %>
    <c:forEach items="${pageInfo.list}" var="o" >
    <tr>

        <td>${o.id}</td>
        <td>${o.name}</td>
        <td>${o.birthday}</td>
        <td>${o.gender}</td>
        <td>${o.career}</td>
        <td>${o.address}</td>
        <td>${o.mobile}</td>

        <td>
        <a href="${pageContext.request.contextPath}/profile/detailProfile?id=${o.id}&method=detail">详情</a>
        <a href="${pageContext.request.contextPath}/profile/detailProfile?id=${o.id}&method=update">修改</a>


     </td>
    </tr>
    </c:forEach>
</table>

<span>第${pageInfo.pageNum}页 / 共${pageInfo.pages}页   共${pageInfo.total}条</span>
<a href="?pageNum=1" >首页</a>
<c:if test="${pageInfo.hasPreviousPage}">
    <a href="${pageContext.request.contextPath}/profile/main?pageNum=${pageInfo.pageNum-1}" >上一页</a>
</c:if>
<c:if test="${pageInfo.hasNextPage}">
    <a href="${pageContext.request.contextPath}/profile/main?pageNum=${pageInfo.pageNum+1}" >下一页</a>
</c:if>
<a href="${pageContext.request.contextPath}/profile/main?pageNum=${pageInfo.pages}" >尾页</a>

</body>
</html>
